home *** CD-ROM | disk | FTP | other *** search
- # include "BlobMgr.h"
-
-
- /* -------------------------------------------------------------------- */
- /* Blob State Change Display Routines */
- /* -------------------------------------------------------------------- */
-
-
-
- /*
- * Set the drawing mode for the given part of the blob.
- * Redraw if it changes.
- */
-
- pascal void
- HiliteBlob (BlobHandle b, short partCode, short mode)
- {
-
- if ((partCode == inDragBlob) || (partCode == inFullBlob))
- {
- if (GetBDrawMode (b, inDragBlob) != mode)
- {
- SetBDrawMode (b, inDragBlob, mode);
- DrawBlob (b, inDragBlob);
- }
- }
- if ((partCode == inStatBlob) || (partCode == inFullBlob))
- {
- if (GetBDrawMode (b, inStatBlob) != mode)
- {
- SetBDrawMode (b, inStatBlob, mode);
- DrawBlob (b, inStatBlob);
- }
- }
- }
-
-
- pascal void
- HiliteBlobSet (BlobSetHandle bSet, short partCode, short mode)
- {
- BlobHandle b;
-
- for (b = FirstBlob (bSet); b != nil; b = NextBlob (b))
- HiliteBlob (b, partCode, mode);
- }
-
-
- /*
- * Increment use count of blob and dim drag area if at or above maximum
- * glue count.
- */
-
- pascal void
- IncBlobGlue (BlobHandle b)
- {
- if ((**b).glueMax != infiniteGlue)
- {
- ++((**b).glueCount);
- if ((**b).glueCount >= (**b).glueMax)
- HiliteBlob (b, inDragBlob, dimDraw);
- }
- }
-
-
- /*
- * Decrement use count of blob and undim drag area if less than maximum
- * glue count.
- */
-
- pascal void
- DecBlobGlue (BlobHandle b)
- {
- if ((**b).glueMax != infiniteGlue)
- {
- --((**b).glueCount);
- if ((**b).glueCount < (**b).glueMax)
- HiliteBlob (b, inDragBlob, normalDraw);
- }
- }
-
-
- pascal void
- SetBGlueMax (BlobHandle b, short max)
- {
- (**b).glueMax = max;
-
- /* dim or undim appropriately */
-
- if ((**b).glueCount < max || max == infiniteGlue)
- HiliteBlob (b, inDragBlob, normalDraw);
- else
- HiliteBlob (b, inDragBlob, dimDraw);
- }
-
-
- pascal short
- GetBGlueMax (BlobHandle b)
- {
- return ((**b).glueMax);
- }
-